# 从控制台输入要出的拳 - 石头（1）/剪刀（2）/布（3）
import random
player = int(input("请输入你要出的拳 石头（1）/剪刀（2）/布（3）"))
# computer = 1
computer = random.randint(1,3)
print("玩家选择的拳头是 %d - 电脑出的拳是 %d" % (player, computer))
# 比较胜负
if ((player == 1 and computer == 2)
        or (player == 2 and computer == 3)
        or (player == 3 and computer == 1)):

    print("你赢了")
# 平局
elif player == computer:
    print("平局")
# 其他情况就是电脑获胜
else:
    print("电脑获胜")
